package com.example.zzbus.ui;

import android.content.Intent;
import android.os.Bundle;

import com.example.zzbus.R;
import com.example.zzbus.base.BaseActivity;
import com.example.zzbus.data.UserData;

import baidumapsdk.demo.search.RoutePlanDemo;

public class WelcomeActivity extends BaseActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_welcome);
        getWindow().getDecorView().postDelayed(new Runnable() {
            @Override
            public void run() {
                //判断是否已经登陆
                if (UserData.isLogin()){
                    startActivity(new Intent(context, RoutePlanDemo.class));
                }else{
                    startActivity(new Intent(context,LoginActivity.class));
                }
                finish();
            }
        },2000);
    }
}
